package com.treasure.mall.biz.entity.embeddable;

import com.treasure.mall.zbq.common.constant.Constant;
import com.treasure.mall.zbq.common.ienum.log.AdvanceLogType;
import com.treasure.mall.zbq.common.ienum.log.LogDataType;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Embeddable;
import java.math.BigDecimal;

/**
 *
 * +---------------------------------------------------------
 * * @package: com.treasure.mall.biz.entity.embeddable
 * * @author: guomw (guomwchen@foxmail.com)
 * * @date: 2020/6/12 19:27
 * * @since: V1.0.0
 * +---------------------------------------------------------
 * 注意：本内容仅限于内部传阅，禁止外泄以及用于其他的商业目的
 * Copyright 2019-2022 com.treasure.mall.biz.entity.embeddable Inc. All rights reserved.
 */
@Data
@Embeddable
public class AdvanceLog {


    /**
     * 商户ID
     */
    @Column(name = "user_id", length = 10)
    private Long userId;

    /**
     * 日志类型
     */
    @Column(name = "log_type", length = 3)
    private LogDataType dataType;

    /**
     * 日志类型
     */
    @Column(name = "log_type", length = 3)
    private AdvanceLogType logType;

    /**
     * 变动金额
     */
    @Column(name = "amount", scale = Constant.SCALE, precision = Constant.PRECISION)
    private BigDecimal amount;

    /**
     * 变动前金额
     */
    @Column(name = "before_amount", scale = Constant.SCALE, precision = Constant.PRECISION)
    private BigDecimal beforeAmount;

    /**
     * 变动后金额
     */
    @Column(name = "after_amount", scale = Constant.SCALE, precision = Constant.PRECISION)
    private BigDecimal afterAmount;

    /**
     * 订单号
     */
    @Column(name = "order_id", length = 50)
    private String orderId;

    /**
     * 关联的充值id
     */
    @Column(name = "recharge_id", length = 50)
    private String rechargeId;

    /**
     * 备注
     */
    @Column(name = "remark", length = 500)
    private String remark;

    /**
     * 操作员id
     */
    @Column(name = "op_id", length = 10)
    private Integer opId;

    /**
     * 操作员账号
     */
    @Column(name = "op_name", length = 30)
    private String opName;
}
